/*
 * INSANE - Interactive Structural Analysis Environment
 *
 * Copyright (C) 2003-2005
 * Universidade Federal de Minas Gerais
 * Escola de Engenharia
 * Departamento de Engenharia de Estruturas
 * 
 * Author's email :    insane@dees.ufmg.br
 * Author's website :  http://www.dees.ufmg.br/insane
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package br.ufmg.dees.insane.model.femModel;

import java.util.ArrayList;
import java.util.Observer;

import br.ufmg.dees.insane.analysisModel.AnalysisModel;
import br.ufmg.dees.insane.continuousPointModel.ContinuousPointModel;
import br.ufmg.dees.insane.materialMedia.constitutiveModel.ConstitutiveModel;
import br.ufmg.dees.insane.materialMedia.degeneration.Degeneration;
import br.ufmg.dees.insane.materialMedia.material.Material;
import br.ufmg.dees.insane.model.femModel.element.Element;
import br.ufmg.dees.insane.model.femModel.loads.Loading;
import br.ufmg.dees.insane.model.femModel.node.Node;
import br.ufmg.dees.insane.model.femModel.problemDriver.ProblemDriver;
import br.ufmg.dees.insane.shape.Shape;
import br.ufmg.dees.insane.util.LoadCombination;
import br.ufmg.dees.insane.util.numericalIntegration.IntegrationOrder;

/**
 * Class representing Model
 * @author  roque
 * @since  Jul 27, 2005
 */
public interface Model {
    
    /** Returns the number of LoadCombinations of this Model.
     *@return The number of LoadCombinations of this Model.
     */
    public abstract int getNumberOfLoadCombinations();

    /** Returns this Model's LoadCombinations list.
     *@return This Model's LoadCombinations list.
     */
    public abstract ArrayList getLoadCombinationsList();

    /** Returns the LoadCombination with the specified label.
     *@param a The label of the desired LoadCombination.
     *@return The LoadCombination with the specified label.
     */
    public abstract LoadCombination getLoadCombination(String a);

    /** Adds the specified LoadCombination to the LoadCombinations list.
     *@param a The LoadCombination to be added to the LoadCombinations list.
     */
    public abstract void add(LoadCombination a);

    /** Removes the specified LoadCombination.
     *@param a The LoadCombination to be removed.
     */
    public abstract void remove(LoadCombination a);
    
//    /** Returns the number of LoadCases of this Model.
//     *@return The number of LoadCases of this Model.
//     */
//    public abstract int getNumberOfLoadCases();
//
//    /** Returns this Model's LoadCases list.
//     *@return This Model's LoadCases list.
//     */
//    public abstract ArrayList getLoadCasesList();
//
//    /** Returns the LoadCase with the specified label.
//     *@param a The label of the desired LoadCase.
//     *@return The LoadCase with the specified label.
//     */
//    public abstract LoadCase getLoadCase(String a);
//
//    /** Adds the specified LoadCase to the LoadCases list.
//     *@param a The LoadCase to be added to the LoadCases list.
//     */
//    public abstract void add(LoadCase a);
//
//    /** Removes the specified LoadCase.
//     *@param a The LoadCase to be removed.
//     */
//    public abstract void remove(LoadCase a);
    
    /** Returns the number of Loading of this Model.
     *@return The number of Loading of this Model.
     */
    public abstract int getNumberOfLoading();

    /** Returns this Model's Loading list.
     *@return This Model's Loading list.
     */
    public abstract ArrayList getLoadingList();

    /** Returns the Loading with the specified label.
     *@param a The label of the desired Loading.
     *@return The Loading with the specified label.
     */
    public abstract Loading getLoading(String a);

    /** Adds the specified LoadCase to the Loading list.
     *@param a The Loading to be added to the Loading list.
     */
    public abstract void add(Loading a);

    /** Removes the specified Loading.
     *@param a The Loading to be removed.
     */
    public abstract void remove(Loading a);
    
    
    /** Returns the number of Elements of this Model.
     *@return The number of Elements of this Model.
     */
    public abstract int getNumberOfElements();

    /** Returns this Model's Elements list.
     *@return This Model's Elements list.
     */
    public abstract ArrayList getElementsList();

    /** Returns the Element with the specified label.
     *@param a The label of the desired Element.
     *@return The Element with the specified label.
     */
    public abstract Element getElement(String a);

    /** Adds the specified Element to the Element list.
     *@param a The Element to be added to the Element list.
     */
    public abstract void add(Element a);

    /** Removes the specified Element.
     *@param a The Element to be removed.
     */
    public abstract void remove(Element a);

    /** Returns the number of Nodes of this Model.
     *@return The number of Nodes of this Model.
     */
    public abstract int getNumberOfNodes();

    /** Returns this Model's Nodes list.
     *@return This Model's Nodes list.
     */
    public abstract ArrayList getNodesList();

    /** Returns the Node with the specified label.
     *@param a The label of the desired Node.
     *@return The Node with the specified label.
     */
    public abstract Node getNode(String a);

    /** Returns the Node with the specified coords.
     *@param x The coord X of the desired Node.
     *@param y The coord Y of the desired Node.
     *@return The Node with the specified coords.
     */
    public abstract Node getNode(double x, double y);

    /** Returns the Node with the specified coords.
     *@param x The coord X of the desired Node.
     *@param y The coord Y of the desired Node.
     *@param z The coord Z of the desired Node.
     *@return The Node with the specified coords.
     */
    public abstract Node getNode(double x, double y, double z);

    /** Adds the specified Node to the Nodes list.
     *@param a The Node to be added to the Nodes list.
     */
    public abstract void add(Node a);

    /** Removes the specified Node.
     *@param a The Node to be removed.
     */
    public abstract void remove(Node a);

    /** Returns the number of AnalysisModels of this Model.
     *@return The number of AnalysisModels of this Model.
     */
    public abstract int getNumberOfAnalysisModels();

    /** Returns this Model's AnalysisModels list.
     *@return This Model's AnalysisModels list.
     */
    public abstract ArrayList getAnalysisModelsList();

    /** Returns the AnalysisModel with the specified label.
     *@param a The label of the desired AnalysisModel.
     *@return The AnalysisModel with the specified label.
     */
    public abstract AnalysisModel getAnalysisModel(String a);

    /** Adds the specified AnalysisModel to the AnalysisModels list.
     *@param a The AnalysisModel to be added to the AnalysisModels list.
     */
    public abstract void add(AnalysisModel a);

    /** Removes the specified AnalysisModel.
     *@param a The AnalysisModel to be removed.
     */
    public abstract void remove(AnalysisModel a);

    /** Returns the number of AnalysisModels of this Model.
     *@return The number of AnalysisModels of this Model.
     */
    public abstract int getNumberOfContinuousPointModels();

    /** Returns this Model's ContinuousPointModels list.
     *@return This Model's ContinuousPointModels list.
     */
    public abstract ArrayList getContinuousPointModelsList();

    /** Returns the ContinuousPointModel with the specified label.
     *@param a The label of the desired ContinuousPointModel.
     *@return The ContinuousPointModel with the specified label.
     */
    public abstract ContinuousPointModel getContinuousPointModel(String a);

    /** Adds the specified ContinuousPointModel to the ContinuousPointModels list.
     *@param a The ContinuousPointModel to be added to the ContinuousPointModels list.
     */
    public abstract void add(ContinuousPointModel a);

    /** Removes the specified ContinuousPointModel.
     *@param a The ContinuousPointModel to be removed.
     */
    public abstract void remove(ContinuousPointModel a);
    
    /** Returns the number of Shapes of this Model.
     *@return The number of Shapes of this Model.
     */
    public abstract int getNumberOfShapes();

    /** Returns the Shape with the specified label.
     *@param a The label of the desired Shape.
     *@return The Shape with the specified label.
     */
    public abstract Shape getShape(String a);

    /** Returns this Model's Shapes list.
     *@return This Model's Shapes list.
     */
    public abstract ArrayList getShapesList();

    /** Adds the specified Shape to the Shapes list.
     *@param a The Shape to be added to the Shapes list.
     */
    public abstract void add(Shape a);
    
    /** Returns the number of IntegrationOrder of this Model.
	*@return The number of IntegrationOrder of this Model.
	*/
    public abstract int getNumberOfIntegrationOrders();

    /** Returns this Model's IntegrationOrder list.
     *@return This Model's IntegrationOrder list.
     */
    public abstract ArrayList getIntegrationOrdersList();

    /** Adds the specified IntegrationOrder to the IntegrationOrders list.
     *@param a The IntegrationOrder to be added to the IntegrationOrders list.
     */
    public abstract void add(IntegrationOrder a);

    /** Returns the IntegrationOrder with the specified label.
     *@param a The label of the desired IntegrationOrder.
     *@return The IntegrationOrder with the specified label.
     */
    public abstract IntegrationOrder getIntegrationOrder(String a);

    /**
	 * Returns the global AnalysisModel of this Model.
	 * @return  The global AnalysisModel of this Model.
	 * @uml.property  name="globalAnalysisModel"
	 */
    public abstract AnalysisModel getGlobalAnalysisModel();

    /**
	 * Sets the global AnalysisModel of this Model.
	 * @param a  The global AnalysisModel of this Model.
	 * @uml.property  name="globalAnalysisModel"
	 */
    public abstract void setGlobalAnalysisModel(AnalysisModel a);
    
    /** Returns the ProblemDriver of this Model.
     *@return The ProblemDriver of this Model.
     */
    public abstract ProblemDriver getProblemDriver();

    /**
	 * Sets the ProblemDriver of this Model.
	 * @param a  The ProblemDriver of this Model.
	 * @uml.property  name="problemDriver"
	 */
    public abstract void setProblemDriver(ProblemDriver a);
    
    /** Returns the degeneration list of this Model.
	*@return The degeneration list of this Model.
	*/
	public abstract ArrayList getDegenerationsList();
	
	/** Add a degeneration to this Model.
	*@param a The degeneration of this Model.
	*/
	public abstract void add(Degeneration dg); 
	
	/** Returns the degeneration with the specified label.
	*@param label The specified label.
	*@return The degeneration with the specified label.
	*/
	public abstract Degeneration getDegeneration(String label); 
	
    /** Returns the material list of this Model.
	*@return The material list of this Model.
	*/
	public abstract ArrayList getMaterialsList();
	
	/** Add a material to this Model.
	*@param a The material of this Model.
	*/
	public abstract void add(Material mat); 
	
	/** Returns the material with the specified label.
	*@param label The specified label.
	*@return The material with the specified label.
	*/
	public abstract Material getMaterial(String label);
	
	/** Returns the ConstitutiveModel list of this Model.
	*@return The ConstitutiveModel list of this Model.
	*/
	public abstract ArrayList getConstitutiveModelsList();
	
	/** Add a ConstitutiveModel to this Model.
	*@param a The ConstitutiveModel of this Model.
	*/
	public abstract void add(ConstitutiveModel cm); 
	
	/** Returns the ConstitutiveModel with the specified label.
	*@param label The specified label.
	*@return The ConstitutiveModel with the specified label.
	*/
	public abstract ConstitutiveModel getConstitutiveModel(String label); 

    /** Clears all attributes of this Model, including lists.*/
    public abstract void clearAll();

    /** Sets to zero all the results calculated. */
    public abstract void cleanResults();
    
    /** Init all variables of this Model.<p>
	*/
	public abstract void init();
    
    /** Updates this model. */
    public abstract void update();
    
    /** Cleans this model. */
    public abstract void clean();
    
    /* (non-Javadoc)
     * @see java.util.Observable#addObserver(java.util.Observer)
     */
    public abstract void addObserver(Observer arg0);

}